Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

4.5K
Visualizações
How do I get the creation date of a mentioned player [DISCORD.JS V13]

Note: I'm using v13 of "discord.js".


This is the command that I currently have:

if (command === 'check') {
    if (message.member.permissions.has(['KICK_MEMBERS'])) {
      let mentioned = message.mentions.users.first();
      let name = mentioned.username

      message.channel.send(`Account name: ${name}.`) 
      message.channel.send(`Account ID: ${mentioned.user.}`)

    } else if (!message.member.permissions.has(
    ['KICK_MEMBERS'])) {
      message.channel.send('You do not have permissions to do this command!')

    } else {
      message.channel.send('An error has occured while attempting to run the command.') 
    }   }

The let mentioned = message.mentions.users.first(); gets the mentioned user


This is how you say the command:

!check @Downrest


Okay, so here's my question. How do I get the creation date of mentioned?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

According to the docs, you can see in the User class that you have a property called createdAt that returns a Date, so mentioned.createdAt should return the creation date of the user.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda